﻿using System;
using System.Collections.Generic;
using Model;
namespace BLL
{
    #region class BSuccessInfo
    /// <summary>
    /// Interface:SuccessInfo Interface
    /// Author:wxc
    /// DateTime:2021/5/26 19:38:09
    /// </summary>	
    public class BSuccessInfo
    {
        #region Add Method
        /// <summary>
        /// Insert an item
        /// </summary>
        /// <param name="SuccessInfo"></param>
        /// <returns>count of rows affected</returns>
        public int AddSuccessInfo(SuccessInfoEntity SuccessInfo)
        {
            DAL.DALSuccessInfo dal = new DAL.DALSuccessInfo();
            return dal.AddSuccessInfo(SuccessInfo);
        }
        #endregion
        #region Mod Method
        /// <summary>
        /// Update an item
        /// </summary>
        /// <param name="SuccessInfo"></param>
        /// <returns>count of rows affected</returns>
        public int ModSuccessInfo(SuccessInfoEntity SuccessInfo)
        {
            DAL.DALSuccessInfo dal = new DAL.DALSuccessInfo();
            return dal.ModSuccessInfo(SuccessInfo);
        }
        #endregion
        #region Del Method
        /// <summary>
        /// Del an item by primary key
        /// </summary>
        /// <param name="iD"></param> 
        /// <returns>count of rows affected</returns>
        public int DelSuccessInfo(string iD)
        {
            DAL.DALSuccessInfo dal = new DAL.DALSuccessInfo();
            return dal.DelSuccessInfo(iD);
        }
        #endregion
        #region Select Method
        /// <summary>
        /// Select an item by Primarykey
        /// </summary>
        /// <param name="iD"></param>
        /// <returns>an item</returns>
        public SuccessInfoEntity GetSuccessInfo(string iD)
        {
            DAL.DALSuccessInfo dal = new DAL.DALSuccessInfo();
            return dal.GetSuccessInfo(iD);
        }
        #endregion
        #region Select_All Method
        /// <summary>
        /// Select all items
        /// </summary>
        /// <returns>items</returns>
        public IList<SuccessInfoEntity> GetSuccessInfos()
        {
            DAL.DALSuccessInfo dal = new DAL.DALSuccessInfo();
            return dal.GetSuccessInfos();
        }
        #endregion
        #region public common select by conditions ,we can use it by changing the GetSuccessInfosbyCondition(datatype condition) and sql
        /// <summary>
        /// Select items by Columns
        /// </summary>
        /// <param name="columns name"></param>
        /// <returns>items</returns>
        public IList<SuccessInfoEntity> GetSuccessInfosbyCondition(string sql)
        {
            DAL.DALSuccessInfo dal = new DAL.DALSuccessInfo();
            return dal.GetSuccessInfosbyCondition(sql);
        }
        #endregion
        #region Select items Top n
        /// <summary>
        /// Select items by Columns
        /// </summary>
        /// <param name="columns name"></param>
        /// <returns>items</returns>
        public IList<SuccessInfoEntity> GetSuccessInfosTopN(int n)
        {
            DAL.DALSuccessInfo dal = new DAL.DALSuccessInfo();
            return dal.GetSuccessInfosTopN(n);
        }
        #endregion
    }
    #endregion
}
